Intra prediction is a compression method used in h.264 standard for video compression, in conjunction with other methods. The method includes a prediction of pixel blocks based on previously encoded and reconstructed blocks in the same frame. One of the characteristics of the h.264 standard (see, for example, ITU-T Recommendation H.264 March 2005, the entire contents of which is expressly incorporated by reference herein) is the possibility of dividing an image in regions called slices. A slice is defined as a sequence of macroblocks being processed in progressive scan order (left to right and top to bottom). A slice is decoded independently. Each macroblock contain luminance and chrominance samples (also referred as luma and chroma samples) which are grouped into blocks of standard sizes 4×4 or 8×8 pixels.
Intra prediction process is connected with transform and quantization processes of the h.264 standard and similar image compression methods, therefore, they are typically considered jointly. A typical block diagram for a conventional intra prediction process is shown in FIG. 1. The process contains forward data path with modules 102, 104, 106, 108, and inverse data path with modules 110 and 112. When source block 122 passes through all computing stages of forward and inverse path it becomes a reconstructed block 118. The reconstructed block feeds a mode selection module 102 and a prediction module 104, where it is saved to be used as a left block neighbor and an upper block neighbor of the block to be predicted. The mode selection module 102 estimates a best prediction mode 124. According to this best prediction mode, a prediction module 104 generates a predicted counterpart 120 for the new source block 122 (this would be the next macroblock to be generated, with respect to the reconstructed block). There are several prediction modes in the h.264 standard, for example, 4 modes for 16×16 luminance block prediction, 9 modes for 4×4 luminance block prediction and 4 modes for chrominance block prediction. A subtracter module 106 generates a prediction error 114 by subtracting the predicted block from the source block. The prediction error is transformed and quantized by the module 108 resulting in residual data 116 that is subsequently used, according to h.264 standard and similar image compression methods, in entropy coding process. The residual data also feeds the inverse data path. The inverse data path presents a decoding part of the intra prediction process and includes an inverse transform and quantization module 110 and an adder 112. The result of inverse data path processing is a new reconstructed block that is used for predicting next block in the current frame. The results of intra prediction are the (best) mode which gives minimum prediction error and the prediction error itself. The reconstructed block and the residual data are then outputted from the pipeline by an output module (not shown). The residual data is used for entropy or arithmetic coding and the reconstructed data is used for motion prediction, according to h.264 standard and similar image compression methods.
Typically, a mode selection process/module includes computing all prediction modes and selecting one of them based on some measure of prediction quality. The conventional measure is a sum of absolute differences (SAD) or a sum of squared differences (SSD) between source and predicted blocks. When the best mode is found, a corresponding predicted block is selected as a result of the prediction.
It is desirable to have an effective way for hardware implementation of such methods by using pipelined hardware architectures. However, in case of intra prediction method, due to a feedback loop 126 including inverse transforms and quantization, the pipeline implementation is severely restricted. In particular, the pipeline latency period needs to be less than the time period available for processing one block, so that a reconstructed block would be ready before a new block is arrived. This feedback loop latency is a major problem for an efficient pipelined hardware implementation of the intra prediction methods.